Component({
  useStore: true,
  data: {
    selected: 0,
    color: "#7A7E83",
    selectedColor: "white",
    list: [{
      "pagePath": "/pages/index/index",
      "text": "首页",
      "iconPath": "../Image/index1.png",
      "selectedIconPath": "../Image/index2.png"
    },
    {
      "pagePath": "/pages/deal/deal",
      "text": "常规交易",
      "iconPath": "../Image/deal1.png",
      "selectedIconPath": "../Image/deal2.png"
    },
    {
      "pagePath": "/pages/cart/cart",
      "text": "购物车",
      "iconPath": "../Image/cart1.png",
      "selectedIconPath": "../Image/cart2.png"
    },
    {
      "pagePath": "/pages/user/user",
      "text": "我的",
      "iconPath": "../Image/user1.png",
      "selectedIconPath": "../Image/user2.png"
    }],
    isShow: true
  },
  attached() {
  
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
      this.setData({
        selected: data.index
      })
    }
  }
})